package org.wwb.antbox.user.iservice.user;

import org.ant.commons.models.model.BaseIdModel;
import org.ant.commons.models.result.BaseEditResult;
import org.ant.commons.models.result.BasePageResult;
import org.ant.commons.models.result.BaseResult;
import org.ant.iservice.common.IBaseService;
import org.wwb.antbox.user.model.user.entity.SysUser;
import org.wwb.antbox.user.model.user.model.SysUserAddModel;
import org.wwb.antbox.user.model.user.model.SysUserDelModel;
import org.wwb.antbox.user.model.user.model.SysUserEditModel;
import org.wwb.antbox.user.model.user.model.SysUserPageModel;
import org.wwb.antbox.user.model.user.view.SysUserPageView;

/**
 * @Author Bond
 * @Date: 2019/10/4 19:55
 * @Description: 系统用户接口
 */
public interface ISysUserService extends IBaseService<SysUser, String> {
    /**
     * 系统用户分页查询
     * @param sysUserPageModel 分页查询参数模型
     * @return BasePageResult<SysUserPageView>
     */
    BasePageResult<SysUserPageView> getSysUserPage(SysUserPageModel sysUserPageModel);

    /**
     * 添加系统用户
     * @param sysUserAddModel
     * @return BaseResult<Integer>
     */
    BaseResult<Integer> saveSysUser(SysUserAddModel sysUserAddModel);

    /**
     * 删除系统用户
     * @param sysUserDelModel
     * @return BaseResult<Integer>
     */
    BaseResult<Integer> delSysUser(SysUserDelModel sysUserDelModel);

    /**
     * 跳转修改系统用户
     * @param baseIdModel 用户id
     * @return
     */
    BaseEditResult doEditSysUser(BaseIdModel<String> baseIdModel);

    /**
     * 编辑系统用户
     * @param sysUserEditModel
     * @return BaseResult<Integer>
     */
    BaseResult<Integer> editSysUser(SysUserEditModel sysUserEditModel);

    /**
     * 重置用户密码
     * @param sysUserDelModel
     * @return BaseResult<Integer>
     */
    BaseResult<Integer> editSysUserPwd(SysUserDelModel sysUserDelModel);

    /**
     * 根据Id获取用户信息
     * @param baseIdModel
     * @return
     */
    BaseResult<SysUser> getUserById(BaseIdModel<String> baseIdModel);
}
